﻿using SkiaSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SkiaAndModel.Models
{
    public class DraggableShape
    {
        public SKRect Bounds { get; private set; }
        public SKColor Color { get; }

        public DraggableShape(SKRect bounds, SKColor color)
        {
            Bounds = bounds;
            Color = color;
        }

        public bool Contains(SKPoint point)
        {
            return Bounds.Contains(point);
        }

        public void Offset(SKPoint delta)
        {
            Bounds = new SKRect(
                Bounds.Left + delta.X,
                Bounds.Top + delta.Y,
                Bounds.Right + delta.X,
                Bounds.Bottom + delta.Y);
        }

    }
}
